package com.yqg.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yqg.education.controller.dto.FileDTO;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * course 实体类
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Getter
@Setter
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 课程名称
     */
    private String name;

    /**
     * 课程类型ID
     */
    private Long courseTypeId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 图片路径
     */
    private String url;

    /**
     * 是否删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private String courseTypeName;

    @TableField(exist = false)
    private List<FileDTO> teachPlans;

    /**
     * 班级课程ID
     */
    @TableField(exist = false)
    private Long classCourseId;
}
